package model;

/**
 * 
 * This class defines a user information like name, id, password and other information
 *
 */
public class User
{
    private String first_name;     
    private String last_name;
    private String user_id;
    private String password;
    private String day;
    private String month;
    private String year;
    private String sex;
    
    /**
     * User private Constructor for User
     * @param builder the builder (builder pattern)
     */
    private User(Builder builder)
    {
    	this.first_name =  builder.first_name;
    	this.last_name = builder.last_name;
    	this.user_id = builder.user_id;
    	this.password = builder.password;
    	this.day = builder.day;
    	this.month = builder.month;
    	this.year = builder.year;
    	this.sex = builder.sex;
    }
    
    /**
     * Builder class for the User
     */
    public static class Builder
    {
    	private String first_name;     
        private String last_name;
        private String user_id;
        private String password;
        private String day;
        private String month;
        private String year;
        private String sex;
        
        /**
         * set first name
         * @param first_name seting the first name of the user as string
         * @return return the Builder (builder pattern)
         */
        public Builder setFirstName(String first_name)
        {
        	this.first_name = first_name;
        	return this;
        }
        
        /**
         * set last name
         * @param last_name setting last name of the user as string
         * @return return the Builder (builder pattern)
         */
        public Builder setLastName(String last_name)
        {
        	this.last_name = last_name;
        	return this;
        }
        
        /**
         * set id
         * @param user_id set the user id of the user
         * @return return the Builder (builder pattern)
         */
        public Builder setId(String user_id)
        {
        	this.user_id = user_id;
        	return this;
        }
        
        /**
         * set password
         * @param password set the password for the user
         * @return return the Builder (builder pattern)
         */
        public Builder setPassword(String password)
        {
        	this.password = password;
        	return this;
        }
        
        /**
         * set birth day
         * @param day set the birth day of the user while registering
         * @return return the Builder (builder pattern)
         */
        public Builder setBirthDay(String day)
        {
        	this.day = day;
        	return this;
        }
        
        /**
         * set birth month
         * @param month set the birth month of the user
         * @return return the Builder (builder pattern)
         */
        public Builder setBirthMonth(String month)
        {
        	this.month = month;
        	return this;
        }
        
        /**
         * set birth year
         * @param year set the year of birth
         * @return return the Builder (builder pattern)
         */
        public Builder setBirthYear(String year)
        {
        	this.year = year;
        	return this;
        }
        
        /**
         * set gender
         * @param sex inputing the gender of the user while registering
         * @return return the Builder (builder pattern)
         */
        public Builder setGender(String sex)
        {
        	this.sex = sex;
        	return this;
        }
        
        /**
         * to build the User Object
         * @return return the built User object
         */
		public User build()
        {
        	return new User(this);
        }
        
    }
    
    /**
     * get first name
     * @return Returns first name of a user.
     */
    public String getFirsName()
    {
        return first_name;
    }


    /**
     * set first name
     * @param first_name updates first name of a user.
     */
    public void setFirstName(String first_name)
    {
        this.first_name = first_name;
    }

	/**
	 * get last name
	 * @return returns last name of a user.
	 */
    public String getLastName()
    {
        return last_name;
    }

    /**
     * set last name
     * @param last_name updates or sets last name of a user.
     */
    public void setLastName(String last_name)
    {
        this.last_name = last_name;
    }

    /**
     * get user id
     * @return returns the user ID of a user.
     */
    public String getUserId()
    {
        return user_id;
    }

    /**
     * set user id
     * @param user_id sets or updates the user ID of a user.
     */
    public void setUserId(String user_id)
    {
        this.user_id = user_id;
    }

    /**
     * get the password
     * @return returns password for a user.
     */
    public String getPassword()
    {
        return password;
    }

    /**
     * set the password
     * @param password sets password for a user.
     */
    public void setPassword(String password)
    {
        this.password = password;
    }

    /**
     * return the birth day of the user
     * @return returns a user's birthday.
     */
    public String getBirthDay()
    {
        return day;
    }

    /**
     * set the birth day of the user
     * @param day sets or updates a user's birthday.
     */
    public void setBirthDay(String day)
    {
        this.day = day;
    }

    /**
     * get the birth month
     * @return returns the birth-month of a user.
     */
    public String getBirthMonth()
    {
        return month;
    }

    /**
     * set birth month
     * @param month sets or updates the birth month of a user.
     */
    public void setBirthMonth(String month)
    {
        this.month = month;
    }

    /**
     * set birth year
     * @return returns birth year of a user.
     */
    public String getBirthYear()
    {
        return year;
    }

    /**
     * set birth year
     * @param year sets birth year of a user.
     */
    public void setBirthYear(String year)
    {
        this.year = year;
    }
	
	/**
	 * get gender
	 * @return returns the gender of a user.
	 */
    public String getGender()
    {
        return sex;
    }

    /**
     * set gender
     * @param sex sets the gender for a user. 
     */
    public void setGender(String sex)
    {
        this.sex = sex;
    }
    
}
